﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MyAnimelistRecommender.Controls"
        xmlns:converter="clr-namespace:MyAnimelistRecommender.Converter"
        xmlns:me="clr-namespace:MartinsEssentials.Animation;assembly=MartinsEssentials"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" mc:Ignorable="d" x:Class="MyAnimelistRecommender.View.MetroWindow"
        Title="MetroWindow" Height="686" Width="1100" d:DataContext="{d:DesignData /SampleData/MetroSampleData.xaml}" FontFamily="Segoe WP Semibold" SnapsToDevicePixels="True" Loaded="Window_Loaded">
    <Window.Resources>
        <ResourceDictionary>
            <DataTemplate x:Key="AnimeTemplate">
                <StackPanel Orientation="Horizontal">
                    <CheckBox IsChecked="{Binding IsActivated}" VerticalAlignment="Center" Visibility="Collapsed"/>
                    <TextBlock Text="{Binding Title}" Margin="25,0,0,0"/>
                </StackPanel>
            </DataTemplate>
            <SolidColorBrush x:Key="SelectedGray" Color="#FFAFAFAF"/>
            <SolidColorBrush x:Key="MouseOverGray" Color="#FFDEDBDB"/>
            <converter:SortingStateToColorConverter x:Key="SortingStateToColorConverter"
                                                 SelectedColor="{StaticResource SelectedGray}" />
            <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Padding" Value="2,0,0,0"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" Margin="0,0,5,0" Padding="0,3">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver"/>
                                        <VisualState x:Name="Disabled"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                        <VisualState x:Name="Unselected"/>
                                        <VisualState x:Name="Selected"/>
                                        <VisualState x:Name="SelectedUnfocused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Unfocused"/>
                                        <VisualState x:Name="Focused"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="ValidationStates">
                                        <VisualState x:Name="Valid"/>
                                        <VisualState x:Name="InvalidFocused"/>
                                        <VisualState x:Name="InvalidUnfocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="true">
                                    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource SelectedGray}"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsMouseOver" Value="True"/>
                                        <Condition Property="Selector.IsSelected" Value="False"/>
                                    </MultiTrigger.Conditions>
                                    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource MouseOverGray}"/>
                                </MultiTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
                <VirtualizingStackPanel IsItemsHost="True"/>
            </ItemsPanelTemplate>
            <Style x:Key="ListBoxStyle1" TargetType="{x:Type ListBox}">
                <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
                <Setter Property="BorderBrush" Value="#FF828790"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
                <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
                <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
                <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
                <Setter Property="VerticalContentAlignment" Value="Center"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBox}">
                            <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="True">
                                <ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}">
                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </ScrollViewer>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                                </Trigger>
                                <Trigger Property="IsGrouping" Value="True">
                                    <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <DataTemplate x:Key="RecommendationGroupTemplate">
                <Grid Height="80" Width="250" Margin="3">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="0.665*"/>
                    </Grid.ColumnDefinitions>
                    <Border HorizontalAlignment="Left" Height="80" Margin="0" Width="60" Padding="3" BorderBrush="Black" BorderThickness="1" >
                        <Image Source="{Binding Image}" Stretch="UniformToFill" />
                    </Border>
                    <TextBlock Text="{Binding MemberScore}" Margin="0,0,0,27.2" VerticalAlignment="Bottom" Grid.ColumnSpan="2" d:IsHidden="True" Visibility="Collapsed"/>
                    <TextBlock Text="{Binding Place}" Margin="0,0,0,-4.72" VerticalAlignment="Bottom" Grid.ColumnSpan="2" d:IsHidden="True" Visibility="Collapsed"/>
                    <TextBlock Text="{Binding Rank}" Margin="0,0,0,-20.68" VerticalAlignment="Bottom" Grid.ColumnSpan="2" d:IsHidden="True" Visibility="Collapsed"/>
                    <TextBlock Text="{Binding Sources}" Margin="0,0,0,-36.64" VerticalAlignment="Bottom" Grid.ColumnSpan="2" d:IsHidden="True" Visibility="Collapsed"/>
                    <TextBlock Text="{Binding Uri}" Margin="0,0,0,-52.6" VerticalAlignment="Bottom" Grid.ColumnSpan="2" d:IsHidden="True" Visibility="Collapsed"/>
                    <StackPanel Height="Auto" Margin="5,0,0,0" Grid.Column="1">
                        <TextBlock Text="{Binding Name}" Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
                        <TextBlock Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Left" Foreground="{Binding Converter={StaticResource SortingStateToColorConverter}, ConverterParameter=calced}">
						<Run Text="Scored Recommends" />
						<Run Text="{Binding CalcedVotes}" />
                        </TextBlock>
                        <TextBlock Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Left" Foreground="{Binding Converter={StaticResource SortingStateToColorConverter}, ConverterParameter=votes}">
						<Run Text="Recommends" />
						<Run Text="{Binding Votes}" />
                        </TextBlock>
                        <TextBlock Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Left" Foreground="{Binding Converter={StaticResource SortingStateToColorConverter}, ConverterParameter=sources}">
						<Run Text="Sources" />
						<Run Text="{Binding Sources}" />
                        </TextBlock>
                    </StackPanel>
                </Grid>
            </DataTemplate>
            <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Padding" Value="2,0,0,0"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="true">
                                    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource MouseOverGray}"/>
                                </Trigger>
                                <MultiTrigger>
                                    <MultiTrigger.Conditions>
                                        <Condition Property="IsMouseOver" Value="True"/>
                                        <Condition Property="Selector.IsSelected" Value="False"/>
                                    </MultiTrigger.Conditions>
                                    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource MouseOverGray}"/>
                                </MultiTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid x:Name="grid">
                                <ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsFocused" Value="True"/>
                                <Trigger Property="IsDefaulted" Value="True"/>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Background" TargetName="grid" Value="{DynamicResource MouseOverGray}"/>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Background" TargetName="grid" Value="{DynamicResource SelectedGray}"/>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False"/>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <DataTemplate x:Key="StringTemplate">
                <StackPanel>
                    <TextBlock Text="{Binding Mode=OneWay}"/>
                </StackPanel>
            </DataTemplate>
            <Style x:Key="ListBoxItemStyle3" TargetType="{x:Type ListBoxItem}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Padding" Value="2,0,0,0"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Storyboard x:Key="SelectedItemFadeIn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="stackPanel">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="stackPanel">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="GenreListBoxItemsChangedFadeIn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="border">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="listBox1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="border1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="textBlock">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="textBlock1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="listBox1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock1">
                    <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="WrapPanelFadeIn">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="listBox2">
                    <EasingDoubleKeyFrame KeyTime="0" Value="-8"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Style x:Key="HyperlinkButton" TargetType="{x:Type Button}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="ü" FontFamily="Webdings" VerticalAlignment="Center" Margin="1,0,5,0" Foreground="{Binding Foreground, ElementName=hypherlinkText1}"/>
                                <TextBlock x:Name="hypherlinkText1" VerticalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.MenuHighlightBrushKey}}" Text="{TemplateBinding Content}" Cursor="Hand" FontFamily="Segoe WP Semibold" Margin="0,1,0,0" />
                            </StackPanel>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsFocused" Value="True"/>
                                <Trigger Property="IsDefaulted" Value="True"/>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Foreground" TargetName="hypherlinkText1" Value="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}"/>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True"/>
                                <Trigger Property="IsEnabled" Value="False"/>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="FontFamily" Value="Webdings"/>
                <Setter Property="Foreground" Value="{Binding Foreground, ElementName=hypherlinkText}"/>
            </Style>
        </ResourceDictionary>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource WrapPanelFadeIn}"/>
        </EventTrigger>
    </Window.Triggers>
    <Grid Margin="0,25,25,25">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="0.86*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="0.7*"/>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="2" Margin="0" Style="{DynamicResource ButtonStyle1}" VerticalAlignment="Top" Name="reloadButton" Click="reloadButton_Click">
                <TextBlock VerticalAlignment="Bottom" Padding="25,0,0,0" Grid.Column="1">Neuladen</TextBlock>
            </Button>
            <TextBlock VerticalAlignment="Bottom" Margin="0,0,0,10" Padding="25,0,0,0" x:Name="animeHeadlineTextblock" MouseUp="animeHeadlineTextblock_MouseUp" Grid.Row="1"><Run Text="{Binding Items.Count, ElementName=listBox, Mode=OneWay}" /><Run Text=" "/><Run Text="Animes" /></TextBlock>
            <ListBox x:Name="listBox" ItemTemplate="{DynamicResource AnimeTemplate}" ItemsSource="{Binding AnimeList}" Margin="0,0,5,0" BorderThickness="0" Background="{x:Null}" BorderBrush="{x:Null}" Grid.Row="2" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}" Style="{DynamicResource ListBoxStyle1}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden" SelectionMode="Multiple" SelectionChanged="listBox_SelectionChanged" />
            <GridSplitter Margin="0" Width="1" Background="Black" Grid.Row="2"/>
            <ListBox  ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Hidden" ItemTemplate="{DynamicResource RecommendationGroupTemplate}" ItemsSource="{Binding Recommendations}" Margin="25,0,0,0" Grid.Column="1" Grid.Row="2" Background="{x:Null}" BorderBrush="{x:Null}"
                     x:Name="listBox2" ItemContainerStyle="{DynamicResource ListBoxItemStyle2}" SelectedItem="{Binding SelectedRecommendation}" RenderTransformOrigin="0.5,0.5" KeyUp="listBox2_KeyUp">
                <ListBox.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ListBox.RenderTransform>
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel>
                            <i:Interaction.Behaviors>
                                <ei:MouseDragElementBehavior />
                                <ei:FluidMoveBehavior Duration="00:00:00.3" AppliesTo="Children">
                                    <ei:FluidMoveBehavior.EaseY>
                                        <CircleEase EasingMode="EaseInOut"/>
                                    </ei:FluidMoveBehavior.EaseY>
                                    <ei:FluidMoveBehavior.EaseX>
                                        <CircleEase EasingMode="EaseInOut"/>
                                    </ei:FluidMoveBehavior.EaseX>
                                    <!--<ei:FluidMoveBehavior.EaseY>
                                    <CircleEase EasingMode="EaseInOut"/>
                                </ei:FluidMoveBehavior.EaseY>-->
                                </ei:FluidMoveBehavior>
                            </i:Interaction.Behaviors>
                        </WrapPanel>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <!--<ListBox.Template>
                    <ControlTemplate>
                        <Grid>
                            <ScrollViewer>
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Grid>
                    </ControlTemplate>
                </ListBox.Template>-->
            </ListBox>
            <Button Grid.Column="1" Margin="0" Style="{DynamicResource ButtonStyle1}" VerticalAlignment="Top" x:Name="SortingModeButton" Click="SortingModeButton_Click" Grid.Row="1">
                <TextBlock VerticalAlignment="Bottom" Padding="28,0,0,0" Grid.Column="1"><Run Text="{Binding Items.Count, ElementName=listBox2, Mode=OneWay}" /><Run Text=" "/><Run Text="Recommendations" /><Run Text=" "/><Run Foreground="{DynamicResource SelectedGray}" Text="by"/><Run Text=" "/><Run Foreground="{DynamicResource SelectedGray}" Text="{Binding SelectedSortingMode}"/></TextBlock>
            </Button>
            <StackPanel x:Name="stackPanel" Grid.Column="2" DataContext="{Binding SelectedRecommendation}" Margin="25,0,0,0" Grid.Row="2" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
                <StackPanel.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </StackPanel.RenderTransform>
                <Border BorderThickness="0,0,0,1" Padding="0,0,0,3" Margin="0,0,0,3" BorderBrush="{DynamicResource SelectedGray}">
                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap" HorizontalAlignment="Left" Foreground="{DynamicResource SelectedGray}"
						me:ContentTransition.Property="Text" me:ContentTransition.Binding="{Binding Name}"
					 	me:ContentTransition.FadeInStoryboard="{StaticResource SelectedItemFadeIn}"
					/>
                </Border>
                <Border Margin="0" Padding="3" BorderBrush="Black" BorderThickness="1" d:IsHidden="True" Visibility="Collapsed" >
                    <Image Source="{Binding Image}" Stretch="UniformToFill" />
                </Border>
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"><Run Text="Place" /><Run Text=" "/><Run Text="{Binding Place}" /></TextBlock>
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"><Run Text="Scored Recommends" /><Run Text=" "/><Run Text="{Binding CalcedVotes}" /></TextBlock>
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"><Run Text="Recommends" /><Run Text=" "/><Run Text="{Binding Votes}" /></TextBlock>
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"><Run Text="Sources" /><Run Text=" "/><Run Text="{Binding Sources}" /></TextBlock>
                <Border x:Name="border1_Copy" BorderThickness="0,0,0,1" Padding="0,10,0,3" Margin="0,0,0,3" BorderBrush="{DynamicResource SelectedGray}" RenderTransformOrigin="0.5,0.5">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <TextBlock TextWrapping="Wrap" HorizontalAlignment="Left" Text="Webseiten" Foreground="{DynamicResource SelectedGray}"/>
                </Border>
                <Button Content="MyAnimeList.net" Tag="{Binding Uri}" Style="{DynamicResource HyperlinkButton}" Name="myanimelistButton" Click="myanimelistButton_Click" />
                <Border x:Name="border" BorderThickness="0,0,0,1" Padding="0,10,0,3" Margin="0,0,0,3" BorderBrush="{DynamicResource SelectedGray}" RenderTransformOrigin="0.5,0.5">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <TextBlock TextWrapping="Wrap" HorizontalAlignment="Left" Text="Genres" Foreground="{DynamicResource SelectedGray}"/>
                </Border>
                <ListBox x:Name="listBox1" ItemTemplate="{DynamicResource StringTemplate}" ItemsSource="{Binding Genres}" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden" ItemContainerStyle="{DynamicResource ListBoxItemStyle3}"
                        me:ContentTransition.Property="ItemsSource" me:ContentTransition.Binding="{Binding Genres}"
					 	me:ContentTransition.FadeInStoryboard="{StaticResource GenreListBoxItemsChangedFadeIn}"
                         Margin="-3,0,0,0" RenderTransformOrigin="0.5,0.5">
                    <ListBox.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </ListBox.RenderTransform>
                </ListBox>
                <Border x:Name="border1" BorderThickness="0,0,0,1" Padding="0,10,0,3" Margin="0,0,0,3" BorderBrush="{DynamicResource SelectedGray}" RenderTransformOrigin="0.5,0.5">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <TextBlock TextWrapping="Wrap" HorizontalAlignment="Left" Text="MAL Statistics" Foreground="{DynamicResource SelectedGray}"/>
                </Border>
                <TextBlock x:Name="textBlock" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5"><TextBlock.RenderTransform>
            			<TransformGroup>
            				<ScaleTransform/>
            				<SkewTransform/>
            				<RotateTransform/>
            				<TranslateTransform/>
            			</TransformGroup>
            		</TextBlock.RenderTransform><Run Text="Memberscore" /><Run Text=" "/><Run Text="{Binding MemberScore}" /></TextBlock>
                <TextBlock x:Name="textBlock1" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5"><TextBlock.RenderTransform>
            			<TransformGroup>
            				<ScaleTransform/>
            				<SkewTransform/>
            				<RotateTransform/>
            				<TranslateTransform/>
            			</TransformGroup>
            		</TextBlock.RenderTransform><Run Text="Rank" /><Run Text=" "/><Run Text="{Binding Rank}" /></TextBlock>
            </StackPanel>
            <GridSplitter Margin="0" Width="1" Background="Black" Grid.Row="2" Grid.Column="1"/>
            <TextBlock VerticalAlignment="Top" Margin="0" Padding="25,0,0,0" Grid.Column="2" Text="Information" Grid.Row="1"/>
            <StackPanel Grid.Column="1" Orientation="Vertical" d:LayoutOverrides="Height">
                <Button Margin="0" Style="{DynamicResource ButtonStyle1}" VerticalAlignment="Top" x:Name="genreFilterToggle" Click="genreFilterToggle_Click">
                    <TextBlock VerticalAlignment="Bottom" Padding="25,0,0,0" Grid.Column="1"><Run Text="Genrefilter"/></TextBlock>
                </Button>
                <StackPanel x:Name="genreFilterStack" Margin="25,5,25,10" Orientation="Horizontal" Visibility="Collapsed">
                    <TextBox TextWrapping="Wrap" Text="{Binding SelectedGenres}" MinWidth="160" Margin="0"/>
                    <Button Content="Los" Margin="10,0,0,0" BorderBrush="{x:Null}" Background="{x:Null}" Name="genrefilterGo" Click="genrefilterGo_Click" />
                </StackPanel>
            </StackPanel>
        </Grid>
        <TextBox x:Name="searchTextBox" HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" FontSize="24" Visibility="Collapsed" KeyUp="searchTextBox_KeyUp">
            <TextBox.Effect>
                <DropShadowEffect BlurRadius="25" ShadowDepth="0"/>
            </TextBox.Effect>
        </TextBox>
    </Grid>
</Window>